package com.lq.schoolshop;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableTransactionManagement
@EnableCaching
@ServletComponentScan(basePackages = "com.lq.schoolshop.Listener")
@MapperScan("com.lq.schoolshop.dao")
public class SchoolshopApplication extends SpringBootServletInitializer {
    public static void main(String[] args) {
        SpringApplication.run(SchoolshopApplication.class, args);
        System.out.println("♥ლ(´ڡ`ლ)ﾞ) ♥ლ(´ڡ`ლ)ﾞ) ♥ლ(´ڡ`ლ)ﾞ) ====小主人,系统安全启动成功===   ლ(´ڡ`ლ)ﾞ ლ(´ڡ`ლ)ﾞ ლ(´ڡ`ლ)ﾞ");
    }

    //为SpringBoot打包项目用的
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(this.getClass());
    }
}
